#ifndef MBM_VUI_ADAPTER_H
#define MBM_VUI_ADAPTER_H

#ifdef __cplusplus
extern "C"
{
#endif
typedef enum
{
	MBM_TP_EVENT_DOWN,
	MBM_TP_EVENT_UP,
	MBM_TP_EVENT_LONG_PRESS,
	MBM_TP_EVENT_MOVE,
	MBM_TP_EVENT_MAX    
}e_mbm_tp_event;


typedef enum 
{
	MBM_Key_0	= 0,
	MBM_Key_1,
	MBM_Key_2,
	MBM_Key_3,
	MBM_Key_4,
	MBM_Key_5,
	MBM_Key_6,
	MBM_Key_7,
	MBM_Key_8,
	MBM_Key_9,
	MBM_Key_LSK,
	MBM_Key_RSK,
	MBM_Key_CSK,
	MBM_Key_Up,
	MBM_Key_Down,
	MBM_Key_Left,
	MBM_Key_Right,
	MBM_Key_Send,
	MBM_Key_End,
	MBM_Key_Clear,
	MBM_Key_Star,
	MBM_Key_Pound,
	MBM_Key_Power,
	MBM_Key_Ok,
	MBM_Key_VolumeUp,
	MBM_Key_VolumeDown,
	MBM_Key_Max	
}e_mbm_key_id;

typedef struct 
{
	Int32 x;
	Int32 y;
}t_mbm_cord;

typedef enum 
{
	MBM_Screen_rotation_0	= 0, //mini-browser: imiTV
	MBM_Screen_rotation_90,
	MBM_Screen_rotation_180,
	MBM_Screen_rotation_270
}e_mbm_rotation_degree;

typedef enum 
{
	MBM_EventType_Up,
	MBM_EventType_Down,
	MBM_EventType_Longpress,
	MBM_EventType_Doubleclick,
	MBM_EventType_Move,
	MBM_EventType_Rotate,
	MBM_EventType_Disturb_Come,
	MBM_EventType_Disturb_Gone,
	MBM_EventType_Disturb_Gone_Post,
	MBM_EventType_Disturb_Tcard_Query,
	MBM_EventType_Disturb_Tcard_Confirm,
	MBM_EventType_Max
}e_mbm_event_type;

typedef enum 
{
	MBM_Event_key,
	MBM_Event_touch,
	MBM_Event_Downloading,
	MBM_Event_Download_Stop,
	MBM_Event_disturb,
	MBM_Event_rotation,
	MBM_Event_logon_ready,
	MBM_Event_param_not_find // added by leon.
}e_mbm_event_id;

typedef union 
{
	e_mbm_key_id key;
	t_mbm_cord	 pos;
	e_mbm_rotation_degree degree;
}u_mbm_event_param;

typedef enum
{
    MBM_APPLET_NONE,
    MBM_APPLET_DOWNLOADING,
    MBM_APPLET_READY,
    MBM_APPLET_BACKGROUND,
    MBM_APPLET_FOREGROUND,
}e_mbm_applet_state;

typedef void (*t_mbm_keyhandler)(Int32 key_event, Int32 key_code);
typedef void (*t_mbm_tphandler)(Int32 tp_event, Int32 x, Int32 y);
//param state: reference e_mbm_applet_state
typedef void (*t_mbm_applet_state_handler)(Int32 state, Int32 scale);

/**
 * @name mbm_Display_DirectDrawImg -discripe
 *
 * @param param1	-property	-discripe
 *
 * @return -discripe
 */
void mbm_Display_DirectDrawImg(UInt16 x, UInt16 y, UInt16 width, UInt16 height, Int32 rot);

/**
 * @name mbm_GetLCDFrameBuffer -discripe
 *
 * @param buf_size	-out	-lcd frame buffer size
 *
 * @return -discripe
 */
void *mbm_GetLCDFrameBuffer(UInt32 * buf_size);

e_mbm_key_id mbm_translate_key_code(UInt32 eventid, UInt32 code);

e_mbm_event_type mbm_translate_key_event(int eventid);

e_mbm_tp_event mbm_translate_tp_event(UInt32 event);

#ifdef __cplusplus
}
#endif

#endif//MBM_VUI_ADAPTER_H
